﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xss.Core;
using System.Collections;

namespace Xss.Logging
{
    public class LogContextFactory : IContextFactory
    {
        /// <summary>
        /// 配置信息列表
        /// </summary>
        public IDictionary Settings { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="args"></param>
        /// <returns></returns>
        public object GetContext(params object[] args)
        {
            var factoryType = Settings["factory"] as Type;
            return Activator.CreateInstance(factoryType, Settings);
        }
    }
}
